package ar.edu.unq.wannaplay.pages.employee;

import org.apache.wicket.spring.injection.annot.SpringBean;

import ar.edu.unq.wannaplay.pages.WPPage;
import ar.edu.unq.wannaplay.panels.employee.NewEmployeePanel;
import ar.edu.unq.wannaplay.services.EmployeeService;
import ar.edu.unq.wannaplay.utils.EmployeeEditer;

public class NewEmployeePage extends WPPage {

    private EmployeeEditer modelObject;

    @SpringBean(name = "service.employeeService")
    private EmployeeService service;

    public NewEmployeePage() {
        super("New Employee Page");
        modelObject = new EmployeeEditer();
        this.initialize();
        this.addLanguageSelect();

    }

    @Override
    protected void addMainContent() {
        NewEmployeePanel panel = new NewEmployeePanel("mainContent", modelObject, service, this.getFeedBackPanel());
        this.add(panel);
    }

    public EmployeeEditer getModelObject() {
        return modelObject;
    }

    public void setModelObject(final EmployeeEditer modelObject) {
        this.modelObject = modelObject;
    }

    public EmployeeService getService() {
        return service;
    }

    public void setService(final EmployeeService service) {
        this.service = service;
    }

}
